<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <script src="../org/angular.min.js"></script>
</head>
<body>
<div ng-app="hd" ng-controller="ctrl">
{{hex}}
</div>
<script>
    var m = angular.module('hd', []);
    m.service('hexafy', function() {
        this.myFunc = function (x) {
            return "对整体module的公用方法的定义。可以进行扩展";
        }
    });

    m.controller('ctrl',  function ($scope,hexafy) {
        $scope.hex = hexafy.myFunc();

    });
</script>
</body>
</html>